package cn.myzf.fort.access.accesscommon.dto;

import com.alibaba.fastjson.annotation.JSONField;


import java.util.List;
import java.util.Objects;


public class HostInfo {

    @JSONField(name = "ip")
    private String host;

    private int port = 22;

    @JSONField(name = "account_name")
    private String user;

    @JSONField(name = "pwd")
    private String pass;

    /**应用名*/
    @JSONField(name = "app_name")
    private String agent="NONE";

    @JSONField(name = "app_cname")
    private String cagent;
    /**本地映射虚拟端口*/
    private int virtualPort;

    private boolean sock5;

    private String sock5Port;

    private List<SubHost> subHost;


    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public String getCagent() {
        return cagent;
    }

    public void setCagent(String cagent) {
        this.cagent = cagent;
    }

    public int getVirtualPort() {
        return virtualPort;
    }

    public void setVirtualPort(int virtualPort) {
        this.virtualPort = virtualPort;
    }

    public boolean isSock5() {
        return sock5;
    }

    public void setSock5(boolean sock5) {
        this.sock5 = sock5;
    }

    public String getSock5Port() {
        return sock5Port;
    }

    public void setSock5Port(String sock5Port) {
        this.sock5Port = sock5Port;
    }

    public List<SubHost> getSubHost() {
        return subHost;
    }

    public void setSubHost(List<SubHost> subHost) {
        this.subHost = subHost;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HostInfo hostInfo = (HostInfo) o;
        return Objects.equals(host,hostInfo.host);
    }

    @Override
    public int hashCode() {
        return Objects.hash(host);
    }
}
